package com.wjjun.base.binding.adapter

import android.view.View
import android.view.View.OnLongClickListener
import android.widget.TextView
import androidx.databinding.BindingAdapter
import androidx.lifecycle.MutableLiveData
import com.wjjun.base.ui.listener.IItemViewLongClickListener
import com.wjjun.base.ui.listener.IViewBinder
import com.wjjun.base.ui.viewmodel.BaseViewModel

/**
 *
 * author : wangjunjun
 * date   : 2022/6/2
 * desc   :
 */

class ViewAdapter {
    companion object{
        @JvmStatic
        @BindingAdapter(value = ["bindView"])
        fun bindView(view:View, binder: IViewBinder) {
            binder.onBindView(view)
        }

        @JvmStatic
        @BindingAdapter(value = ["onLongClick"])
        fun bindLongClick(view:View, listener: OnLongClickListener) {
            view.setOnLongClickListener(listener)
        }

    }
}